package text.gen;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class genActivity extends Activity implements OnClickListener{
	ArrayList<String> database;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		Button genBtn = (Button) findViewById(R.id.genBtn);
		EditText addText = (EditText) findViewById(R.id.addText);
		TextView genText = (TextView) findViewById(R.id.genText);
	}

	@Override
	public void onClick(View v) {
		EditText addText = (EditText) findViewById(R.id.addText);
		TextView genText = (TextView) findViewById(R.id.genText);
		String objects[] = addText.toString().split(" ");
		String object = null;
		for (int i=0 ; i <= objects.length ; i++){
			database.add(objects[i]);
			object = object+("")+objects[i];
		}


		genText.setText(object);
	}
}